package com.design.interpreter.demo1;

public class InterpreterPatternDemo {
    public static void main(String[] args) {
        // 创建具体表达式
        Expression addExpression = new AddExpression(5, 3);

        // 创建上下文
        Context context = new Context();

        // 解释并计算表达式
        int result = context.interpret(addExpression);
        System.out.println("Result: " + result);
    }
}
